package com.bkq.cb;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.Window;
import android.widget.ProgressBar;

public class Splash extends Activity {
	 protected boolean _active = true;
	  protected int _splashTime = 100;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);
        
          Thread splashTread = new Thread() {
            @Override
            public void run() {
                try {
                    int waited = 0;
                    while(_active && (waited < _splashTime)) {
                        sleep(100);
                        if(_active) {
                            waited += 3;
                        }
                    }
                } catch(InterruptedException e) {
                   
                } finally {
                    finish();
                    startActivity(new Intent(Splash.this,Login.class));
                    stop();
                }
            }
        };
        splashTread.start();
        
    }

    

}